//
//  WatchDetailHeaderView.m
//  ZITHER
//
//  Created by imac on 2018/6/12.
//  Copyright © 2018年 MinesTime. All rights reserved.
//

#import "WatchDetailHeaderView.h"
#import "MCURLImageView.h"

@interface WatchDetailHeaderView ()
@property (weak, nonatomic) IBOutlet MCURLImageView *goodsImageView;
@property (weak, nonatomic) IBOutlet UILabel *brandNameLabel;
@property (weak, nonatomic) IBOutlet UILabel *seriesNameLabel;
@property (weak, nonatomic) IBOutlet UILabel *modelNameLabel;
@property (weak, nonatomic) IBOutlet UIImageView *hotImageView;
@property (weak, nonatomic) IBOutlet UILabel *secondPriceLabel;
@property (weak, nonatomic) IBOutlet UILabel *CNYPriceLabel;
@property (weak, nonatomic) IBOutlet UILabel *HKDPriceLabel;
@property (weak, nonatomic) IBOutlet UILabel *EUPPriceLabel;
@property (weak, nonatomic) IBOutlet UILabel *USDPriceLabel;


@end
@implementation WatchDetailHeaderView
+ (WatchDetailHeaderView *)instance {
    
    WatchDetailHeaderView *view = (WatchDetailHeaderView *)[[[NSBundle mainBundle] loadNibNamed:NSStringFromClass([self class]) owner:self options:nil] firstObject];

    return view;
}
- (void)awakeFromNib {
    [super awakeFromNib];
    
}
#pragma mark - Setter
- (void)setBaseInfo:(WatchDetailBaseModel_Info_BaseInfo *)baseInfo {
    _baseInfo = baseInfo;
    [_hotImageView setHidden:[_baseInfo.hotSearch isEqualToString:@"1"] ?NO :YES];
    [_goodsImageView setImageWithURLStr:_baseInfo.image_default placeholderImageType:(ImageViewPlaceholderTypeGoods)];
    _brandNameLabel.text = _baseInfo.brand_name_ch;
    _seriesNameLabel.text = _baseInfo.series_name;
    _modelNameLabel.text = _baseInfo.model_name;
    _secondPriceLabel.text = _baseInfo.latelyPrice;
    _CNYPriceLabel.text = _baseInfo.officalPriceInfo.conjuncturePrice;
    _HKDPriceLabel.text = _baseInfo.officalPriceInfo.hkPrice;
    _EUPPriceLabel.text = _baseInfo.officalPriceInfo.europePrice;
    _USDPriceLabel.text = _baseInfo.officalPriceInfo.usaPrice;
}
#pragma mark - 加载更多
- (IBAction)refreshClick:(UIButton *)sender {
    if (self.viewMoreRefreshBlock) {
        self.viewMoreRefreshBlock();
    }
}



@end
